<template>
	<view class="user_card" @click="clickCard">
		<!-- 内容 -->
		<view class="card_content">
			<u--image :showLoading="true" :src="baseUrl+props.data.header" width="80px" height="80px"></u--image>
			<view class="user_info">
				<text style="color: #000;">{{props.data.nickname}}</text>
				<text style="color: #ffa64e;margin: 10rpx 0;">{{props.data.cur_city}} | {{props.data.birth}} | {{props.data.education}}</text>
				<u--text type="#565656" :lines="1" :text="props.data.info"></u--text>
			</view>
		</view>
	</view>
</template>

<script setup>
import { baseUrl } from '../../utils/request';
import { onMounted } from "vue";
	const props=defineProps({
		data:{
			type:Object,
			default:()=>{}
		}
	})
	const emit=defineEmits(['clickCard'])
	// 点击了卡片
	const clickCard=()=>{
		emit('clickCard',props.data.id)
	}
	onMounted(()=>{
		
	})
</script>

<style lang="scss">
.user_card{
	background: #fff;
	margin-bottom: 10rpx;
	.card_content{
		display: flex;
		padding: 20rpx;
		border-top: 1px solid #f9f9f9;
		border-bottom: 1px solid #f9f9f9;
		.user_info{
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			margin-left: 20rpx;
		}
	}
}
</style>